package com.lesson00;

import java.awt.*;

public class Test1 {
    public static void main(String[] args) {
        Frame frame = new Frame("测试窗口");
        Button b = new Button();
        Panel east = new Panel(new GridLayout(2,1));
        east.add(new Button("East"));
        east.add(new Button("East"));
        Panel west = new Panel(new GridLayout(2,1));
        west.add(new Button("West"));
        west.add(new Button("West"));
        Panel south = new Panel(new GridLayout(1,2));
        south.add(new Button("South"));
        south.add(new Button("South"));
        Button north = new Button("North");
        Panel center = new Panel(new GridLayout(2,1));
        Panel center2 = new Panel(new GridLayout(1,2));
        center2.add(new Button("Center"));
        center2.add(new Button("Center"));
        center.add(new Button("Center"));
        center.add(center2);
        frame.add(south, BorderLayout.SOUTH);
        frame.add(north, BorderLayout.NORTH);
        frame.add(east, BorderLayout.EAST);
        frame.add(west, BorderLayout.WEST);
        frame.add(center, BorderLayout.CENTER);
        frame.setSize(400, 400);
        frame.setVisible(true);
    }
}
